home *** CD-ROM | disk | FTP | other *** search
- Path: news.sara.nl!ct-pc6
- From: brands@chemeng.chem.uva.nl (Danny Brands)
- Newsgroups: comp.lang.c++,comp.os.ms-windows.programmer.win32
- Subject: Re: VC++ 4.0 memory allocation slower than in 2.x!!!
- Date: Fri, 29 Mar 96 10:18:44 GMT
- Organization: ITS/UvA
- Message-ID: <4jgde4$kgo_001@chem.uva.nl>
- References: <alanDozpsy.Kn6@netcom.com>
- NNTP-Posting-Host: ct-pc6.chem.uva.nl
- X-Newsreader: News Xpress Version 1.0 Beta #4
-
- In article <alanDozpsy.Kn6@netcom.com>,
- alan@netcom.com (Robert Alan Wright) wrote:
- |I recently posted a request for help in determining why a program which
- |was simply recompiled on VC++4.0 suddenly ran 3 times slower than the
- |same one did under VC++ 2.0.
- |
- |I went through all the usual steps of making sure that I had the right
- |compiler/link settings and even built my own version of the MFC
- |libraries to make sure they were fully optimized.
- |
- |Upon further profiling and other exploration, I found out the problem:
- |THE VC++ 4.0 MEMORY ALLOCATION ROUTINES ARE WAY SLOWER!!!
- |
- |I don't understand how this can be, but I switched from using the
- |Microsoft malloc/realloc routines to my own versions, and now I
- |get about the same performance from the app that I used to.
- |As best I can tell, the new realloc routine is about 10 TIMES SLOWER
- |than the old one, and malloc is also slower. At this point, I
- |have replaced the use of almost all Microsoft MFC classes as well as
- |C/C++ runtime routines in order to get decent performance. I am quite
- |disgusted in the apparent low quality of their implementations.
- |
- |Can anyone offer any more rational explanation for this than that
- |Microsoft has horrible quality control? I'm having a hard time
- |believing they could do screw up this badly.
-
- Check the the latest issues of Byte. I think, in the march issue
- they have an article on this. They were running preformance analysis
- programs which did a lot of malloc stuff with unreproducable
- results. I appeared that it had to do with the allignment of the allocated
- block in memory if I understood it well.
-
- Hope this helps.
-
- Danny
-